home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for NON-COMMERCIAL purposes and without
- * fee is hereby granted provided that this copyright notice
- * appears in all copies. Please refer to the file "LICENSE"
- * for further important copyright and licensing information.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
- * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
- *
- * THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
- * CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
- * PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
- * NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE
- * SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE
- * SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE
- * PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). SUN
- * SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR
- * HIGH RISK ACTIVITIES.
- */
-
- package java.sql;
-
- /**
- * A ResultSetMetaData object can be used to find out about the types
- * and properties of the columns in a ResultSet.
- */
-
- public interface ResultSetMetaData {
-
- /**
- * What's the number of columns in the ResultSet?
- *
- * @return the number
- */
- int getColumnCount() throws SQLException;
-
- /**
- * Is the column automatically numbered, thus read-only?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isAutoIncrement(int column) throws SQLException;
-
- /**
- * Does a column's case matter?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isCaseSensitive(int column) throws SQLException;
-
- /**
- * Can the column be used in a where clause?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isSearchable(int column) throws SQLException;
-
- /**
- * Is the column a cash value?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isCurrency(int column) throws SQLException;
-
- /**
- * Can you put a NULL in this column?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return columnNoNulls, columnNullable or columnNullableUnknown
- */
- int isNullable(int column) throws SQLException;
-
- /**
- * Does not allow NULL values.
- */
- int columnNoNulls = 0;
-
- /**
- * Allows NULL values.
- */
- int columnNullable = 1;
-
- /**
- * Nullability unknown.
- */
- int columnNullableUnknown = 2;
-
- /**
- * Is the column a signed number?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isSigned(int column) throws SQLException;
-
- /**
- * What's the column's normal max width in chars?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return max width
- */
- int getColumnDisplaySize(int column) throws SQLException;
-
- /**
- * What's the suggested column title for use in printouts and
- * displays?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- String getColumnLabel(int column) throws SQLException;
-
- /**
- * What's a column's name?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return column name
- */
- String getColumnName(int column) throws SQLException;
-
- /**
- * What's a column's table's schema?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return schema name or "" if not applicable
- */
- String getSchemaName(int column) throws SQLException;
-
- /**
- * What's a column's number of decimal digits?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return precision
- */
- int getPrecision(int column) throws SQLException;
-
- /**
- * What's a column's number of digits to right of the decimal point?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return scale
- */
- int getScale(int column) throws SQLException;
-
- /**
- * What's a column's table name?
- *
- * @return table name or "" if not applicable
- */
- String getTableName(int column) throws SQLException;
-
- /**
- * What's a column's table's catalog name?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return column name or "" if not applicable.
- */
- String getCatalogName(int column) throws SQLException;
-
- /**
- * What's a column's SQL type?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return SQL type
- * @see Types
- */
- int getColumnType(int column) throws SQLException;
-
- /**
- * What's a column's data source specific type name?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return type name
- */
- String getColumnTypeName(int column) throws SQLException;
-
- /**
- * Is a column definitely not writable?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isReadOnly(int column) throws SQLException;
-
- /**
- * Is it possible for a write on the column to succeed?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isWritable(int column) throws SQLException;
-
- /**
- * Will a write on the column definitely succeed?
- *
- * @param column the first column is 1, the second is 2, ...
- * @return true if so
- */
- boolean isDefinitelyWritable(int column) throws SQLException;
- }
-